<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8" />
		<title></title>
		<link rel="stylesheet" type="text/css" href="css/bootstrap.css" />
		<link rel="stylesheet" type="text/css" href="http://apps.bdimg.com/libs/fontawesome/4.4.0/css/font-awesome.min.css"/>
	</head>

	<body>
		<div class="container">
			<div class="row" style="margin-top: 100px;">
				<button type="button" class="btn btn-primary btn-block" data-toggle="modal" data-target="#myModal">查看所有学生</button>
				<!-- Modal -->
				<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
					<div class="modal-dialog" role="document">
						<div class="modal-content">
							<div class="modal-header">
								<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
								<h4 class="modal-title" id="myModalLabel">学生信息</h4>
							</div>
							<div class="modal-body">
								<table class="table table-striped table-responsive">
									<thead>
										<tr>
											<th>学生姓名</th>
											<th>学生的年龄</th>
											<th>所在家庭地址</th>
											<th>联系电话</th>
										</tr>
									</thead>
									<tbody id="stus"></tbody>
								</table>
							</div>
							<div class="modal-footer">
								<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
							</div>
						</div>
					</div>
				</div>
			</div>
			<div class="row">
				<div id="mylunbo" class="carousel slide" data-ride="carousel" data-interval="1000">
					<!-- Indicators -->
					<ol class="carousel-indicators">
						<li data-target="#mylunbo" data-slide-to="0" class="active"></li>
						<li data-target="#mylunbo" data-slide-to="1"></li>
						<li data-target="#mylunbo" data-slide-to="2"></li>
						<li data-target="#mylunbo" data-slide-to="3"></li>
						<li data-target="#mylunbo" data-slide-to="4"></li>
					</ol>

					<!-- Wrapper for slides -->
					<div class="carousel-inner" role="listbox">
						<div class="item active">
							<img src="img/1.jpg" width="100%" alt="...">
							<div class="carousel-caption">
								...
							</div>
						</div>
						<div class="item">
							<img src="img/2.jpg" width="100%" alt="...">
							<div class="carousel-caption">
								<h1>我也不知道写什么</h1>
							</div>
						</div>
						<div class="item">
							<img src="img/3.jpg" width="100%"/>
						</div>
						<div class="item">
							<img src="img/4.jpg" width="100%"/>
						</div>
						<div class="item">
							<img src="img/5.jpg" width="100%"/>
						</div>
					</div>

					<!-- Controls -->
					<a class="left carousel-control" href="#mylunbo" role="button" data-slide="prev">
						<span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
						<span class="sr-only">Previous</span>
					</a>
					<a class="right carousel-control" href="#mylunbo" role="button" data-slide="next">
						<span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
						<span class="sr-only">Next</span>
					</a>
				</div>
			</div>
		</div>
		<script src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
		<script src="js/bootstrap.js" type="text/javascript" charset="utf-8"></script>
		<script type="text/javascript">
			$.get("data/students.json", function(data) {
				$.each(data, function(i, stu) {
					var tr = $("<tr></tr>").appendTo("#stus");
					$.each(stu, function(k, v) {
						$("<td>" + v + "</td>").appendTo(tr);
					});
				});
			})
		</script>
	</body>

</html>